﻿Imports DevExpress.XtraEditors.ViewInfo

Public Class RichTextButtonEditViewInfo
    Inherits ButtonEditViewInfo
    Implements IHeightAdaptable
    Public Sub New(ByVal item As RepositoryItem)
        MyBase.New(item)
    End Sub
    Public Function CalcHeight(ByVal cache As DevExpress.Utils.Drawing.GraphicsCache, ByVal width As Integer) As Integer Implements IHeightAdaptable.CalcHeight
        Dim ri As RepositoryItemButtonRichTextEditExt = (TryCast(Item, RepositoryItemButtonRichTextEditExt))
        Dim vi As New RichTextEditViewInfo(ri.RichEdit)
        vi.EditValue = Me.EditValue
        Return vi.CalcHeight(width) + 6
    End Function

End Class
